Skip to content

Retry the PyPI lookup in the version check - #467

Open
lelia wants to merge 3 commits into
mainfrom
lelia/version-check-pypi-retry
Open

lelia wants to merge 3 commits into
mainfrom
lelia/version-check-pypi-retry

Conversation

@lelia

@lelia lelia commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The required check_version job read the latest release from PyPI with one urlopen call and no timeout. A single dropped connection (URLError: [SSL: UNEXPECTED_EOF_WHILE_READING]) failed it on a recent PR, which blocks the merge until someone reruns the job. The rerun passed with no code change.

Changes

  • version-check.yml: the PyPI request has a 15 s timeout and is retried up to four times, with 2, 4 and 8 s pauses, on connection and SSL errors, timeouts, responses cut off mid-read, and HTTP 5xx.
  • If every attempt fails, or PyPI returns a 4xx, the job fails with a message that names PyPI and says the PR's version isn't the problem, instead of a traceback.
  • Bumps the version to 2.15.2 and adds a CHANGELOG entry.
  • The version comparisons after the request are unchanged.
  • Quotes $GITHUB_ENV on the two lines actionlint's shellcheck pass flagged.

Notes

  • Bumps to 2.15.2 with a CHANGELOG entry. The branch was riding main's unreleased 2.15.1 until Bump pinned Coana CLI to 15.15.3 #469 published it, and the version check requires a version not yet on PyPI.
  • Checked with actionlint (clean), and by running the extracted script against PyPI and against mocked SSL EOF, 503, read timeout, remote disconnect, incomplete read, repeated failure and 404 responses.
  • The Manage PR Comment step still posts "Please increment..." whenever this job fails, including on a PyPI failure. The job log gives the real reason.

check_version read the latest release from PyPI with one request and no
timeout, so a single dropped connection failed a required check and
blocked the merge until someone reran the job.

The request now has a 15 s timeout and is retried up to four times, with
2, 4 and 8 s pauses, on connection errors, timeouts and 5xx responses. If
PyPI still can't be read, the job fails with a message that names PyPI and
says the PR's version isn't the problem. The version comparison is
unchanged.

Also quotes $GITHUB_ENV, which actionlint's shellcheck pass flagged.
@lelia
lelia requested a review from a team as a code owner November 24, 2026 03:33
@cursor

cursor Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
CI-only workflow change with no impact on application code, auth, or releases.

Overview
Hardens the version check CI job’s PyPI lookup so transient outages don’t look like a bad version bump. The one-shot urlopen is replaced with a 15s timeout, up to four retries with exponential backoff on network/SSL/timeouts, truncated reads, and 5xx responses; 4xx and exhausted retries exit with explicit messages that the failure is PyPI/network, not the PR version. The two GITHUB_ENV appends are quoted for shellcheck. Version comparison logic after a successful fetch is unchanged.

Reviewed by Cursor Bugbot for commit bb504ef. Configure here.

@lelia

lelia commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit bb504ef. Configure here.

main released 2.15.1, which this branch was riding unreleased.
@lelia
lelia deployed to socket-firewall November 24, 2026 23:36 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
socket-firewall — 9a010002 Deployed Nov 24, 2026 by lelia via python-sfw-smoke-enterprise #707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant